<div class="container-fluid">
	<div id="pad-wrapper">
		<!-- products table-->
		<!-- the script for the toggle all checkboxes from header is located in js/theme.js -->
		<div class="table-wrapper products-table section">
			<div class="row-fluid head">
				<div class="span12">
					<h4>个人代理</h4>
				</div>
			</div>
			<div class="row-fluid">
				<table class="table table-hover">
					<thead>
					<tr>
						<td>姓名</td>
                        <td>性别</td>
						<td>手机号</td>
						<td>微信昵称</td>
                        <td>申请时间</td>
                        <td>状态</td>
						<td>操作</td>
					</tr>
					</thead>
                    <?php foreach($list as $v): ?>
						<tr>
							<td><?php echo $v['name']; ?></td>
                            <td><?php echo $v['sex'] == 1 ? '男' : '女'; ?></td>
                            <td><?php echo $v['mobile']; ?></td>
                            <td><?php echo $v['nickname']; ?></td>
                            <td><?php if($v['create_time'] != 0) echo date('Y-m-d H:i:s', $v['create_time']); ?></td>
							<td>
                                <?php if($v['reply_status'] == 0){
									echo '待审核';
                                }else if($v['reply_status'] == 1){
									echo '审核通过';
                                }else if($v['reply_status'] == 2){
                                    echo '审核拒绝';
                                }; ?>
                            </td>
							<td>
                                <?php if($v['reply_status'] == 0): ?>
									<button type="button" class=" btn-flat primary" onclick="window.location.href='/agent/edit?id=<?php echo $v['id'];?>'" >审核</button>
                                <?php elseif($v['reply_status'] == 1):?>
                                    <button type="button" class=" btn-flat primary" onclick="location.href='<?php if(isset($v['qrcode_file'])):?> <?php echo STATIC_IMAGE . $v['qrcode_file'] ?> <?php endif;?>'">二维码</button>
								<?php endif; ?>
								<button type="button" class=" btn-flat primary" onclick="window.location.href='/agent/update?id=<?php echo $v['id'];?>'">详细</button>
							</td>
						</tr>
                    <?php endforeach; ?>
				</table>
			</div>
		</div>
		<!-- end products table -->
	</div>
	<div class="pagination pull-right">
        <?php echo $pagination; ?>
	</div>
</div>

<script type="text/javascript">
//	<!--
//	function del(pid)
//	{
//		if(confirm("确定要删除吗？"))
//		{
//			window.location.href = "/doctor/delet?id=" + pid;
//		}
//	}
//	//-->
</script>


